# Contributor: Richard Mortier <mort@cantab.net>
# Maintainer: Richard Mortier <mort@cantab.net>
pkgname=jhead
pkgver=3.08
pkgrel=0
pkgdesc="Exif Jpeg header manipulation tool"
url="http://www.sentex.net/~mwandel/jhead/"
arch="all"
license="custom"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/Matthias-Wandel/jhead/archive/refs/tags/$pkgver.tar.gz"
options="!check" # fixme: failing tests

# secfixes:
#   3.06.0.1-r0:
#     - CVE-2020-6624
#     - CVE-2020-6625

build() {
	make all
}

check() {
	cd tests
	./runtests
	diff expected-txt results-txt
}

package() {
	install -Dm755 jhead "$pkgdir"/usr/bin/jhead
	install -Dm644 jhead.1 -t "$pkgdir"/usr/share/man/man1/
}

sha512sums="
eb50e487eaacf2b489ce5e76f09730c8bb0c50a0e2d7c854ebe8bd204ead8f6256e052c49c72af179dc46dd5372c1eff32ff549b947637b242dc7bbe8c7b20d5  jhead-3.08.tar.gz
"
